
#include <qlib/utils/gds_utils.h>
namespace qlib {

namespace gds_utils {

double roundFunc(double value, double scaling) {
  int v = llround(scaling * value);
  double result = double(v) / scaling;
  return result;
}

Vec2d roundFunc(Vec2d value, double scaling) {
  return Vec2d(roundFunc(value.x, scaling), roundFunc(value.y, scaling));
}

}  // namespace gds_utils
}  // namespace qlib
